#pragma once

#include <opencv2/opencv.hpp>
using namespace cv;

template<typename T>
double normL2Sqr(const cv::Point3_<T>&a, const cv::Point3_<T> &b)
{
	return (a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y) + (a.z - b.z)*(a.z - b.z);
}

template<typename T>
double normL2(const cv::Point3_<T>&a, const cv::Point3_<T> &b)
{
	return sqrt((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y) + (a.z - b.z)*(a.z - b.z));
}


template<typename T>
double normL2(const cv::Point_<T>&a, const cv::Point_<T> &b)
{
	return sqrt((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y));
}

template<typename T>
double normL2Sqr(const cv::Point_<T>&a, const cv::Point_<T> &b)
{
	return ((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y));
}

